package cn.com.api.mapper.base;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.*;

import cn.com.api.entity.ApiU_match_vote;

//DAO
public interface U_match_voteMapperBase {

	// 根据id查看
	@Select("SELECT * FROM U_MATCH_VOTE  WHERE VOTE_ID = #{vote_id}")
	public ApiU_match_vote findU_match_voteById(Integer vote_id);

	// 查看数据集
	@Select("SELECT * FROM U_match_vote")
	public List<ApiU_match_vote> findU_match_votes();

	// 根据条件查看数据集
	public List<Map<String, Object>> findU_match_votesByMap(HashMap condition);

	// 添加
	@Insert("INSERT INTO U_MATCH_VOTE (MATCH_WORKS_ID, USER_ID, VOTE_TIME, EXT1, EXT2, EXT3) VALUES (#{match_works_id}, #{user_id}, #{vote_time}, #{ext1}, #{ext2}, #{ext3})")
	@Options(useGeneratedKeys = true, keyProperty = "vote_id")
	public int insertU_match_vote(ApiU_match_vote u_match_vote);

	// 修改
	@Update("UPDATE U_MATCH_VOTE SET MATCH_WORKS_ID = #{match_works_id}, USER_ID = #{user_id}, VOTE_TIME = #{vote_time}, EXT1 = #{ext1}, EXT2 = #{ext2}, EXT3 = #{ext3} WHERE VOTE_ID = #{vote_id}")
	public int updateU_match_vote(ApiU_match_vote u_match_vote);

	// 删除
	@Delete("DELETE FROM U_MATCH_VOTE  WHERE VOTE_ID = #{vote_id}")
	public int deleteU_match_vote(Integer vote_id);

	// Foreign keys revelant

	// region Indexs revelant

}
